
<%@ page import="auth.Userprofile" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'userprofile.label', default: 'Userprofile')}" />
        <title>Mein BidHub</title>
        
        <style type="text/css" media="screen">
        
        .subject {
			font-size:15px;
			font-weight:bold;

		}
		
		.data {
			font-size:15px;
		
		}
        
        
        </style>
    </head>
    <body>
        <div class="body">
            <h1>Meine Gebote</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
      
            <div class="col_8 col" style="margin-left:150px; margin-bottom:30px; margin-right:150px; padding:2px;">
            	<span><g:link controller="auction" action="showAuctions"><g:submitButton id="bidButton" class="left" name="Meine Auktionen" /></g:link></span>
            	<span><g:link controller="userprofile" action="showData"><g:submitButton id="bidButton" class="right" name="Meine Daten" /></g:link></span>
            </div>
            
            <div class="col_12 col">
               <table>
                    <thead>
                        <tr>
                        	<th>Bild</th>
                        	
                            <th>Titel</th>
                        
                            <th>Start</th>
                            
                            <th>Ende</th>
                        
                            <th>Dein Gebot</th>
                            
                            <th>H&ouml;chstgebot</th>
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${bidInstanceList}" status="i" var="bidInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        	
                        	<td style= "width:100px;"> <g:displayFile filename="${bidInstance.auction.filename}"
                 				user="${bidInstance.auction.user}" /></td>
                        	
                            <td><g:link controller="auction" action="show" id="${bidInstance.auction.id}">${bidInstance.auction.heading}</g:link></td>
                        
                            <td><g:formatDate date="${bidInstance.auction.startDate}" format="dd/MM/yyyy"/></td>
                            
                            <td><g:formatDate date="${bidInstance.auction.endDate}" format="dd/MM/yyyy"/></td>
                        
                            <td>${bidInstance.bidAmount}</td>
                            
                            <td>${bidInstance.auction.highestBid?.bidAmount}</td>
                      
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
        </div>
    </body>
</html>
